<!DOCTYPE html>

<html>

<head>
    <meta charset="utf-8">
    <title>收集详细信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_739294_4v71dzenelg.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/my.css" media="all">
    <style type="text/css">
        .dBody {
            width: 100%;
            top: 300px;
            position: absolute;
            z-index: 10;
            bottom: 5px;
        }
        
        .layui-form-item .layui-input-inline {
            width: 130px;
        }
        
        .layui-form-label {
            padding: 0;
        }
        
        .layui-table,
        .layui-table-view {
            margin: 0;
        }
    </style>
</head>

<body>
    <div style="margin-left:30px;margin-top:20px">
        <div class="layui-form">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width:100px;text-align:left">科室名称：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="custname" style="width:150px;text-align:left"></span>
                        <input id="cid" type="text" name="cid" style="display:none">
                    </div>
                    <label class="layui-form-label" style="width:100px;text-align:left">收集时间：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="ctime" style="width:150px;text-align:left"></span>
                    </div>
                    <label class="layui-form-label" style="width:100px;text-align:left">收集人员：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="cname" style="width:150px;text-align:left"></span>
                    </div>
                    <label class="layui-form-label" style="width:100px;text-align:left">审核人员：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="sname" style="width:150px;text-align:left"></span>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width:100px;text-align:left">总箱数：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="total" style="width:150px;text-align:left"></span>
                    </div>
                    <label class="layui-form-label" style="width:100px;text-align:left">总重量：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="totalweight" style="width:150px;text-align:left"></span>
                    </div>
                    <label class="layui-form-label" style="width:100px;text-align:left">感染性废物：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="num_0" style="width:150px;text-align:left"></span>
                    </div>
                    <label class="layui-form-label" style="width:100px;text-align:left">重量：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="weight_0" style="width:150px;text-align:left"></span>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width:100px;text-align:left">损伤性废物：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="num_1" style="width:150px;text-align:left"></span>
                    </div>
                    <label class="layui-form-label" style="width:100px;text-align:left">重量：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="weight_1" style="width:150px;text-align:left"></span>
                    </div>
                    <label class="layui-form-label" style="width:100px;text-align:left">病理性废物：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="num_5" style="width:150px;text-align:left"></span>
                    </div>
                    <label class="layui-form-label" style="width:100px;text-align:left">重量：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="weight_5" style="width:150px;text-align:left"></span>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width:100px;text-align:left">药物性废物：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="num_4" style="width:150px;text-align:left"></span>
                    </div>
                    <label class="layui-form-label" style="width:100px;text-align:left">重量：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="weight_4" style="width:150px;text-align:left"></span>
                    </div>
                    <label class="layui-form-label" style="width:100px;text-align:left">化学性废物：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="num_3" style="width:150px;text-align:left"></span>
                    </div>
                    <label class="layui-form-label" style="width:100px;text-align:left">重量：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="weight_3" style="width:150px;text-align:left"></span>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width:100px;text-align:left">利器盒：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="nval1_2" style="width:150px;text-align:left"></span>
                    </div>
                    <label class="layui-form-label" style="width:100px;text-align:left">胎盘：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="nval1_5" style="width:150px;text-align:left"></span>
                    </div>
                    <label class="layui-form-label" style="width:100px;text-align:left">输液瓶：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="num_2" style="width:150px;text-align:left"></span>
                    </div>
                    <label class="layui-form-label" style="width:100px;text-align:left">重量：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="weight_2" style="width:150px;text-align:left"></span>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width:100px;text-align:left">输液袋：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="num_7" style="width:150px;text-align:left"></span>
                    </div>
                    <label class="layui-form-label" style="width:100px;text-align:left">重量：</label>
                    <div class="layui-input-inline">
                        <span class="layui-form-label" id="weight_7" style="width:150px;text-align:left"></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="dBody">
        <table class="layui-hide" id="test2" lay-filter="test2" style="height:400px"></table>
    </div>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/layui/jquery-3.3.1.min.js"></script>
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'treeGrid'], function() {
            var $ = layui.$,
                treeGrid = layui.treeGrid;
            layui.use('treeGrid', function() {
                ptable = treeGrid.render({
                    id: 'test2',
                    elem: '#test2',
                    url: '../../../../Collect/collectSmall', //iid父节点的ID  ciid 父节点ID父节点的iid为空 子节点的ciid必填
                    where: {
                        cid: $("#cid").val()
                    },
                    iconOpen: false,
                    idField: 'ciid',
                    treeId: 'ciid' //树形id字段名称
                        ,
                    treeUpId: 'iid' //树形父id字段名称
                        ,
                    treeShowName: 'sno' //以树形式显示的字段
                        ,
                    isOpenDefault: false,
                    isFilter: false,
                    cols: [
                        [{
                            field: 'sno',
                            width: "20%",
                            title: '条形码',
                            align: 'left'
                        }, {
                            field: 'type',
                            title: '状态',
                            width: "20%",
                            align: 'center',
                            templet: function(d) {
                                switch (d.type) {
                                    case "0":
                                        return "感染性废物";
                                        break;
                                    case "1":
                                        if (d.iid == "" || d.iid == undefined || isNaN(d.iid)) {
                                            return "损伤性废物";
                                        } else if (d.num != 0) {
                                            return "利器盒";
                                        } else {
                                            return "损伤性废物";
                                        }
                                        break;
                                    case "2":
                                        return "输液瓶";
                                        break;
                                    case "3":
                                        return "化学性废物";
                                        break;
                                    case "4":
                                        return "药物性废物";
                                        break;
                                    case "5":
                                        if (d.iid == "" || d.iid == undefined || isNaN(d.iid)) {
                                            return "病理性废物";
                                        } else if (d.num != 0) {
                                            return "胎盘";
                                        } else {
                                            return "病理性废物";
                                        }
                                        break;
                                    case "7":
                                        return "输液袋";
                                        break;
                                    default:
                                        return "";
                                        break;
                                }
                            }
                        }, {
                            field: 'weight',
                            title: '重量',
                            width: "10%",
                            align: 'center',
                        }, {
                            field: 'num',
                            title: '只数',
                            width: "10%",
                            align: 'center',
                        }, {
                            field: 'time',
                            title: '时间',
                            align: 'center',
                            width: "25%"
                        }, {
                            title: '科室',
                            width: "14%",
                            align: 'center',
                            field: 'areaname',
                        }]
                    ],
                });
                $("table tr").css({
                    "background": "#1E9FFF",
                    "color": "white"
                });
            })
        });
    </script>

</body>

</html>